package com.seaboxdata.dao;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.seaboxdata.entity.BatchInterfaceConfig;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * ${comments}
 * 
 * @author Mark
 * @email sunlightcs@gmail.com
 * @date 2020-07-06 15:20:44
 */
@Mapper
public interface BatchInterfaceConfigDao extends BaseMapper<BatchInterfaceConfig> {

    List<BatchInterfaceConfig> getAllByStatusAndIsInit(@Param("status")String status,@Param("isInit") String isInit);

    void updateByTableName(String tableName);

    void updateIncresementColumnTableName(@Param("tableName") String tableName,@Param("incresementColumn") String incresementColumn);

    @DS("queuing")
    Integer getTotalCount(@Param("batchInterfaceConfig") BatchInterfaceConfig batchInterfaceConfig);

    @DS("queuing")
    String getLatest(@Param("batchInterfaceConfig") BatchInterfaceConfig batchInterfaceConfig);

    @DS("queuing")
    void deleteAll(@Param("batchInterfaceConfig") BatchInterfaceConfig batchInterfaceConfig);

}
